//交集，并集，差集
let arr1=[2,3,4,6];
let arr2=[5,7,8,6,3];
//交集
// let newArr=arr1.filter(item=>{
//     return arr2.includes(item)
// })
// console.log(newArr)
//[3,6]
//交集
let temp=[...arr1,...arr2];
console.log([...new Set([...arr1,...arr2])])
//[2,3,4,6,5,7,8]
//差集
let newArr2=arr1.filter(item=>{
    return arr2.indexOf(item)==-1;
})
console.log(newArr2)
//[2,4]
